package com.free.food.core.exception;

import com.free.food.core.enums.ResultEnum;
import lombok.Getter;

/**
 * 类功能描述：
 *
 * @author：刘富国
 * @createTime：2019/2/21 11:31
 */
@Getter
public class ProductException extends RuntimeException {

    private Integer code;

    public ProductException(Integer code, String message) {
        super(message);
        this.code = code;
    }

    public ProductException(ResultEnum resultEnum) {
        super(resultEnum.getMsg());
        this.code = resultEnum.getCode();
    }
}
